<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:app="http://java.sun.com/jsf/composite/app"
      xmlns:ds="http://deltaset.org/deltaset-faces"
      xmlns:f="http://java.sun.com/jsf/core">
    <f:view>
        <h:head>            
            <title>#{msg['login.legend']}</title>
            <ds:themeStylesheet themeName="#{preferencesBean.themeName}"/>
            <ds:applyStyle/>
            <h:outputStylesheet name="app/css/layout.css"/>
        </h:head>
        <h:body  styleClass="ui-widget-shadow">
            <h:form>
                <div id="login" class="ui-widget ui-widget-content ui-corner-all">
                    <div class="ui-widget-header ui-corner-top">
                        <h2 style="margin-left:15px;">#{msg['login.legend']}</h2>
                    </div>
                    <h:panelGrid cellpadding="5px;" width="100%" columns="1" styleClass="ds-form-grid ui-widget-content">
                        <f:facet name="header">                            
                            <h:messages styleClass="ui-state-highlight ui-corner-all"/>
                        </f:facet>
                        <ds:fieldset width="100%">
                            <ds:inputText label="#{msg['login.username']}"
                                          value="#{loginBean.userName}"
                                          requiredMessage="Username is required!"
                                          required="true"/>
                            <ds:inputSecret label="#{msg['login.password']}"
                                            value="#{loginBean.password}"
                                            requiredMessage="Password is required!"
                                            required="true"/>
                        </ds:fieldset>
                        <f:facet name="footer">
                            <h:panelGroup style="display:block; text-align:center;">
                                <h:commandButton id="login"
                                                 action="#{loginBean.login}"
                                                 value="#{msg['login.action']}" 
                                                 styleClass="ds-button"/><br/>
                            
                                <h:link outcome="register">Register new User </h:link>

                            </h:panelGroup>
                        </f:facet>

                    </h:panelGrid>
                </div>
            </h:form>

        </h:body>
    </f:view>
</html>

